﻿<%@ Page Language="C#" MasterPageFile="~/Pages/Main.master" AutoEventWireup="true"
    CodeFile="MyJobTags.aspx.cs" Inherits="MyJobTags" %>

<%@ Register Src="../controls/SearchTag.ascx" TagName="SearchTag" TagPrefix="uc1" %>
<%@ Register Src="../controls/TagsToday.ascx" TagName="TagsToday" TagPrefix="uc2" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <div id="sub-tab">
        <a href="Tags.aspx">所有标签</a><a href="MyJobTags.aspx" class="current">我的标签</a> <a href="MyJobTagsMgr.aspx">管理标签</a>
        
    </div>
    <div id="tab-side">
        <uc1:SearchTag ID="SearchTag1" runat="server" />
        <br />
        <uc2:TagsToday ID="TagsToday1" runat="server" />
        
    </div>
    <div id="tab-content">
        <div class="info-item">
            <span class="title">我的标签<img src="../images/line_gray.png" height="9" width="350" /><span>
            </span>
                <img src="../images/icon_+02.png" />
            </span>
            
            <div class="content">
            <div style="font-size:120%">
                <asp:DataList ID="dlTags" runat="server" RepeatColumns="4" >
                    <ItemTemplate>
                        <div onmouseover ="this.style.background= '#C0C0FF';this.style.cursor= 'hand ';" onmouseout ="this.style.background='#EFF3FB';" onClick ="javascript:sendRequest('TagView.aspx?t=<%# EncodeText(Eval("Tagjob_text"))%>');" style="background:#EFF3FB;"><img src='../Images/keep_<%# GetLevel(Eval("Tagjob_bin_day"),Eval("Tagjob_bin_week"))%>.gif' /><%# Eval("Tagjob_text")%>(<%# Eval("Tagjob_bin_day")%>)&nbsp;&nbsp;&nbsp;</div>
                    </ItemTemplate>
                </asp:DataList>
                </div>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" OnPageChanging="AspNetPager1_PageChanging"
                    PageSize="10">
                </webdiyer:AspNetPager>
            </div>
             <span class="title">显示文章<img src="../images/line_gray.png" height="9" width="350" /><span>
            </span>
                <img src="../images/icon_+02.png" />
            </span>
            <span id="results"></span>
        </div>
    </div>

    <script type="text/javascript">
var xmlHttp = null;
window.onload = function() 
{    
    loadXmlHttp();
}    

function loadXmlHttp() {
    if (window.XMLHttpRequest) { // IE7, Mozilla, Safari, Opera, etc.
        xmlHttp = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        try{
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); // IE 5.x and 6
        }
        catch (e){}        
    }               
}        
    
function sendRequest(url) {        
    if (xmlHttp) 
    {    
       var r = document.getElementById('results'); 
        r.innerHTML = 'Loading ...';
               
        // Open HTTP connection to url.
        xmlHttp.open("GET", url, true); // true = async
       
        // Define the callback function for async call
        xmlHttp.onreadystatechange = onCallback;       
        
        // Specify form data in request body
        xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');        
        
        // Send request without any additional parameters
        xmlHttp.send(null);
    }
}

function onCallback() {    
 
  // Check for the completed status 
  if (xmlHttp.readyState == 4) {
    
    // Check for successful server response
    if (xmlHttp.status == 200){
        var r = document.getElementById('results'); 
        r.innerHTML = xmlHttp.responseText;         
    }
    else {
        // HTTP error
        alert('Error: ' + xmlHttp.status);
    }

  }
}    
    </script>

</asp:Content>
